package com.zuipin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.${className!""};
import com.zuipin.mapper.${className!""}Mapper;
import com.zuipin.service.I${className!""}Service;
import com.zuipin.util.Pagination;

/**
 * ${remark!""}服务实现
 * 
 * @ClassName: ${className!""}Ser5viceImpl
 * @Description: TODO
 * @author  ${author!"robot"}
 * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
 */
@Service
public class ${className!""}ServiceImpl implements I${className!""}Service {
	
	@Resource
	private ${className!""}Mapper ${obName!""}Mapper;
	
	@Override
	public ${className!""} findBy${PKName!""}(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if> ${pro.propType} ${pro.propName}<#assign i=i+1 /></#if></#list>) {
		return ${obName!""}Mapper.findBy${PKName!""}(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if>${pro.propName}<#assign i=i+1 /></#if></#list>);
	}
	
	@Override
	public void insert(${className!""} ${obName!""}) {
		${obName!""}Mapper.insert(${obName!""});
	}
	
	@Override
	public void update(${className!""} ${obName!""}) {
		${obName!""}Mapper.update(${obName!""});
	}
	
	@Override
	public void delete(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if> ${pro.propType} ${pro.propName}<#assign i=i+1 /></#if></#list>) {
		${obName!""}Mapper.delete(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if>${pro.propName}<#assign i=i+1 /></#if></#list>);
		
	}
	
	@Override
	public List<${className!""}> seach${className!""}(${className!""} ${obName!""}, Pagination page) {
		return ${obName!""}Mapper.seach${className!""}(${obName!""}, page);
	}
	
}
